<template>
  <div class="search-com">
    <div v-show="showDelete" class="list-item-delete  ">
      <span class="pull_left">{{ item.text }}</span>
      <span class="pull_right" @click.stop="deleteCurItem(item, index)"
        >删除</span
      >
    </div>
    <img :src="styleUrls[item.type][item.stylesType]" />
  </div>
</template>

<script>
import { styleUrls } from "../../data";
export default {
  props: {
    item: {
      type: Object,
      default: () => {}
    },
    index: {
      type: Number,
      default: -1
    },
    showDelete: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      styleUrls
    };
  },
  methods: {
    deleteCurItem(e, i) {
      this.$emit("deleteCurItem", e, i);
    }
  }
};
</script>

<style lang="scss" scoped>
.search-com {
  position: relative;
  // padding: 9px 12px 0 12px;
  height: 72px;
  background-color: #fff;
  img {
    width: 100%;
  }
}
</style>
